import request from "@/utils/request";
//开始审核
export function StartTasks(data) {
  return request({
    url: `/mc/audit/startZHPS/${data.id}`, // 在路径中动态添加 code 参数
    method: "get",
  });
}
//执行任务
export function execTask(params) {
  return request({
    url: `/mc/audit/execTask/${params.projectId}`,
    method: "post",
    data: params,
  });
}
// 评委签名
export function startJudgeSign(params) {
  return request({
    url: `/mc/audit/startJudgeSign`,
    method: "put",
    data: params,
  });
}
//获取签到信息
export function selectMyApply(params) {
  return request({
    url: `/mc/audit/selectMyApply?projectId=${params.projectId}&userId=${params.userId}`,
    method: "get",
  });
}
// 查询项目
export function judgeProjectInfo(params) {
  return request({
    url: `/mc/audit/getProjectInfo/${params.id}`,
    method: "get",
  });
}
// 添加评审
export function addJudge(params) {
  return request({
    url: "/mc/audit",
    method: "post",
    data: params,
  });
}
//修改评委

export function putJudge(params) {
  return request({
    url: `/mc/ProjectJudge?id=${params.id}`,
    method: "put",
    data: params,
  });
}
// 删除评审
export function delJudge(params) {
  return request({
    url: `/mc/ProjectJudge?id=${params.id}`,
    method: "delete",
    data: params,
  });
}
// 查询评审
export function queryJudge(params) {
  return request({
    url: `/mc/judgeUser/list?type=${params.type}`,
    method: "get",
    data: params,
  });
}

export function projectInfoAndJudge(params) {
  return request({
    url: `/mc/audit/projectInfoAndJudge/${params.projectId}`,
    method: "get",
  });
}
export function applySupplierInfo(params) {
  return request({
    url: `/mc/audit/applySupplierInfo/${params.id}`,
    method: "get",
  });
}
//修改报名的供应商
export function updateApplySupplier(params) {
  return request({
    url: `/mc/audit/updateApplySupplier`,
    method: "put",
    data: params,
  });
}
//批量查询供应商上传参数
export function applySupplierInfoByProjectId(params) {
  return request({
    url: `/mc/audit/applySupplierInfoByProjectId/${params.id}`,
    method: "get",
  });
}
//供应商上传文件审核
export function updateSupplierPushValue(params) {
  return request({
    url: `/mc/audit/updateSupplierPushValue`,
    method: "put",
    data: params,
  });
}

//分数查询
export function selectSupplierAndScore(params) {
  return request({
    url: `/mc/audit/selectSupplierAndScore?projectId=${params.projectId}&type=${params.type}`,
    method: "get",
  });
}
//获取分数列表
export function selectGroupByMark(params) {
  return request({
    url: `/mc/audit/selectGroupByMark?projectId=${params.projectId}&type=${params.type}`,
    method: "get",
  });
}
//提交分数
export function updateScore(params) {
  return request({
    url: `/mc/audit/updateScore`,
    method: "put",
    data: params,
  });
}
export function totalScore(params) {
  return request({
    url: `/mc/audit/totalScore?projectId=${params.projectId}`,
    method: "get",
  });
}
export function projectInfoAndSupplierAndJudge(params) {
  return request({
    url: `/mc/project/projectInfoAndSupplierAndJudge?id=${params.id}`,
    method: "get",
  });
}
//选择中标人
export function choiceSupplier(params) {
  return request({
    url: `/mc/audit/choiceSupplier`,
    method: "put",
    data: params,
  });
}
export function endJudgeSign(params) {
  return request({
    url: `/mc/audit/endJudgeSign`,
    method: "put",
    data: params,
  });
}
//签名
export function auditsign(params) {
  return request({
    url: `/mc/audit/sign`,
    method: "put",
    data: params,
  });
}

//项目文件上传
export function uploadProjectFile(params, projectCode,projectId) {
  return request({
    url: `/common/uploadProjectFile?projectCode=${projectCode}&projectId=${projectId}`,
    method: "post",
    data: params,
  });
}

//删除保存文件
export function deleteStoreFileByIds(params) {
  return request({
    url: `mc/audit/deleteStoreFileByIds/${params.projectId}/${params.ids}`,
    method: "delete",
  });
}
//价格计算
export function calculatePrice(params) {
  return request({
    url: `/mc/audit/calculatePrice?projectId=${params.projectId}&type=${params.type}`,
    method: "get",
  });
}
//保存文件
export function insertStoreFile(params) {
  return request({
    url: `/mc/audit/insertStoreFile/${params.projectId}`,
    method: "post",
    data: params,
  });
}
//分数下拉框
export function downBox(params) {
  return request({
    url: `/mc/audit/downBox?projectId=${params.projectId}&type=${params.type}`,
    method: "get",
  });
}
export function selectStoreFileList(params) {
  return request({
    url: `/mc/audit/selectStoreFileList?applyId=${params.applyId}`,
    method: "get",
  });
}
//查询上一个节点
export function queryTaskId(params) {
  return request({
    url: `/mc/audit/queryTaskId/${params.projectId}`,
    method: "get",
  });
}

//查询结果确认中止状态
export function selectResultStatus(params) {
  return request({
    url: `/mc/audit/selectResultStatus/${params.projectId}`,
    method: "get",
  });
}


//竞价类

export function startVIE(data) {
  return request({
    url: `/mc/vieAudit/startVIE/${data.id}`, // 在路径中动态添加 code 参数
    method: "get",
  });
}

export function vieAudit(params) {
  return request({
    url: `/mc/vieAudit`,
    method: "post",
    data: params,
  });
}
//查询主持人
export function selectMc(projectId) {
  return request({
    url: `/mc/vieAudit/selectMc/${projectId}`,
    method: "get",
  });
}

//签名
export function vieAuditSign(params) {
  return request({
    url: `/mc/vieAudit/sign`,
    method: "put",
    data: params,
  });
}
//修改报名的供应商
export function vieAuditupdateApplySupplier(params) {
  return request({
    url: `/mc/vieAudit/updateApplySupplier`,
    method: "put",
    data: params,
  });
}
//执行任务
export function vieAuditexecTask(params) {
  return request({
    url: `/mc/vieAudit/execTask/${params.projectId}`,
    method: "post",
    data: params,
  });
}
//供应商上传文件审核
export function vieAuditupdateSupplierPushValue(params) {
  return request({
    url: `/mc/vieAudit/updateSupplierPushValue`,
    method: "put",
    data: params,
  });
}
//选择中标人
export function vieAuditchoiceSupplier(params) {
  return request({
    url: `/mc/vieAudit/choiceSupplier`,
    method: "put",
    data: params,
  });
}
//查询上一个节点
export function vieAuditqueryTaskId(params) {
  return request({
    url: `/mc/vieAudit/queryTaskId/${params.projectId}`,
    method: "get",
  });
}
//查询结果确认中止状态
export function vieAuditselectResultStatus(params) {
  return request({
    url: `/mc/vieAudit/selectResultStatus/${params.projectId}`,
    method: "get",
  });
}